Improving segmentations of a deep neural network

ABSTRACT

This invention is related to a method to improve the performance of a deep neural network ( 10 ) for the identification of a segmentation target ( 111 ) in a medical image ( 12, 110 ), comprising the steps of performing n training steps on said deep neural network ( 10 ) for the identification of said region of interest on two different representations ( 13, 14 ) of the same segmentation target ( 111 ), said representations ( 13,14 ) being definitions of the same segmentation target ( 111 ).

TECHNICAL FIELD

The present invention relates generally to a method to improve thesegmentation performance of a computer implemented deep learningalgorithm, and this especially in the field of X-ray imaging. It is thepurpose of this invention to generally improve the performance ofparticular segmentation tasks in radiography images, such as thedetection of the collimation area, or the area in the image which isobscured by a body part, or the area representing bony structures.

BACKGROUND OF THE INVENTION

The performance of a medical imaging segmentation task, such as thedetermination of the collimation area in a radiography image is atypical problem in general radiography that up-to today finds manycomputer implemented approaches, which rely on different imageprocessing methods. The collimation area is the exposed area of adetector forming the image that is produced by a collimated X-ray beam.Specifically for the collimation area detection problem, differentconventional image processing solutions have been proposed in the artthat rely at least on some form of edge detection. Collimation areadetection was traditionally applied in practice by the radiographer on afreshly acquired image before it was sent to the radiologists readingstation. The collimation step as such allowed the radiographer to removesuperfluous areas of the acquired image without relevant information,while at the same time providing focus for the radiologist on the regionof interest. Automation of this otherwise manual operation using imageprocessing techniques reduces the workload for the radiographer.

Conventional image processing and feature detection techniques rely onknown features of the elements within the image to be detected, such asfor instance a sharp edge at the border of the collimation area, orknowledge about the image information at the edges of an image. Also forinstance, is it characteristic by nature for a collimated radiographthat the collimation area has a known rectangular shape, at least whenthe collimation area entirely fits the visible image.

Nevertheless, said conventional methods or task-specific algorithmsoften fail to correctly determine these collimation edges because ofdifferent reasons, such as for instance the high variability in thegrayscale values on such an edge, which may be easily detectable by thehuman eye, but which may confuse conventional image processingalgorithms when not properly implemented.

This results in the frequent occurrence of two types of error: eitherthe collimation area is estimated as being too large (false negativeerrors), or else too much of the usable image is hidden by assumedcollimation borders (false positive errors). The false positive errorsare far less desirable, because in this case an undesired, butavailable, portion of the image is discarded (or cut away) which maylead to a retake of the image in the worst case scenario.

Relatively recently, computer based artificial intelligence is beingconsidered as a potential solution for various image categorisation andsegmentation problems. More specifically, artificial neural networks aretrained (to progressively improve their ability) to do tasks byconsidering examples, generally without task-specific programming. Forexample, in image recognition, they might learn to identify images thatcontain cats by analysing example images that have been manuallylabelled as “cat” or “no cat” and using the analytic results to identifycats in other images. They have found most use in applications difficultto express with a traditional computer algorithm using rule-basedprogramming.

Segmentation tasks in medical images fall in this category, and a lot ofinvestigation is being done in this area on deep learning and in theapplication of deep neural networks. Deep learning computing arecomputing systems vaguely inspired by the biological neural networksthat constitute animal brains. The neural network itself is not analgorithm, but rather a framework for many different machine learningalgorithms to work together and process complex data inputs. Suchsystems “learn” to perform tasks by considering examples, generallywithout being programmed with any task-specific rules.

A deep neural network is an artificial neural network with multiplelayers which consists of interconnected nodes between the input andoutput layers. According to the input patterns, the deep neural networkis presented with and using a learning rule, it can be trained to find amathematical manipulation by modifying the weights of the connectionsbetween the layers to turn the input into the output. The network movesthrough the layers calculating a confidence level of each output. Assuch, a deep learning network may be trained to recognize thecollimation area in a radiography image, and return the recognitionresult as a confidence level map. The user can review the results andcompare them with the output the network should display (i.e. comparethem with a confidence level map representing the ground truth, beingthe correct answer). Each mathematical manipulation as such isconsidered a node in a layer, and complex deep neural networks have manylayers, hence the name “deep” networks. The goal is that eventually, thenetwork will be trained to decompose an image into features, identifytrends that exist across all samples and process new images by theirsimilarities without requiring human input.

This principle may thus be applied to many different problem statementsand is thus not limited to the application of finding the collimationarea.

SUMMARY OF INVENTION

The present invention provides a method for improving the performance ofa deep neural network for the identification of a segmentation target(or a region of interest) in a medical image, comprising the steps ofperforming two training steps on said deep neural network for theidentification of said region of interest on two differentrepresentations of the same segmentation target, said representationsbeing a definition of a region and of a contour of said segmentationtarget, such as a detected confidence level region map and a detectedconfidence level contour map, as set out in claim 2.

More generally, the present invention provides for a method forimproving the performance of a deep neural network on performing asegmentation task of identifying a region of interest in an input imagewhich is a medical image, comprising the steps of, performing n trainingtasks on said deep neural network for the identification of said regionof interest, wherein each training task is respectively performed on adifferent representation of said segmentation target, wherein n≥2,performing a validation of one of said n representations of saidsegmentation target against the remaining of n representations, by meansof applying shape similarity or shape matching algorithms between saidone of said n representations and said remaining of n representations,returning a validated segmentation result comprising a validatedrepresentation of said segmentation target as a result for theidentified region of interest.

Specific examples and preferred embodiments are set out in the dependentclaims.

In the context of this invention, a detected confidence level region maprepresents the pixel wise probability of the presence of a part of thesegmentation target in the medical image in the form of an image matrix.The probability of the presence of a pixel element at a pixel locationis expressed as the pixel value. Similarly, a detected confidence levelcontour map represents the pixelwise probability of the presence of apart of a contour in the same medical image in the form of an imagematrix.

The result achieved by the dual learning step as described above is thatthe deep neural network is trained twice on the same input data,resulting in a double output representing however the same result: thesegmentation target represented by an area in the image (a detectedconfidence level region map), and the same segmentation targetrepresented as a contour delineating the same area (a detectedconfidence level contour map). In the training step, the deep neuralnetwork is presented with two sets of ground truths for the two desiredoutputs. Since the internal working of the neural network is differentfor the detection of the different representations of the segmentationresult, it intrinsically means that there is truly supplementaryinformation created that may be used to enhance the detection outcome.

Generally speaking, a deep neural network can thus be trained ondifferent representations of the same segmentation result. In thecontext of this invention, a representation of a segmentation target maybe a contour, a contour map, a probability contour map, a region map, aprobability region map, a set of contour points, a set of cornersdelineating a polygon, a set of piecewise continuous functions or alike,that each may be embodied as an image mask representing saidrepresentations in the same or different spatial resolution as theoriginal medical image or—alternatively—that can be described in anotherway (such as a list with coordinates of corners, or an alternativeparameter space than the image space such as for example the polarrepresentation of a line).

In the subsequent steps of the method of this invention, the detectedconfidence level contour map is used to identify a number of contourelements, which are tested and validated against the information that ispresent in the second output; the detected confidence level region map.

In the context of this invention, a contour map has to be understood asa representation of a contour in the form of a matrix (image matrix), agrid, a map or a mask. In this representation, the pixel value in acertain map location will determine the presence of a part of thecontour at the location of that pixel. In case of a confidence levelcontour map, the pixel value in a certain map location will determinethe probability of the presence of a part of the contour at the locationof that pixel. Some locations in this confidence level contour map willhave a higher probabilities associated to them than others.

In the context of this invention, the “detected confidence level contourmap” is the contour map (in the form as explained above) that iscalculated by the deep neural network from the provided input of amedical image.

The above mentioned principles may be applied to a segmentationalgorithm that is for instance targeted toward the segmentation of thecollimation area in a radiographic image. The improved collimationsegmentation algorithm of the invention will reduce the number of falsepositive and false negative errors, and thus will eventually reduce therisk for wrongly interpreting a part of the image when part of theregion of interest is—for instance—mistakenly hidden. A false positiveerror in this context is the erroneous underestimation of thecollimation area in a radiographic image. Another advantage is thatconsequently less manual intervention by a radiographer will be neededfor making corrections to the collimation polygon. Also will the betterdetection performance of the exact collimation area lead to an improvedimage perception of the image when the collimation borders are moreprecisely black-bordered (i.e. visually collimated). Further advantagesand embodiments of the present invention will become apparent from thefollowing description and drawings.

The present invention can be implemented as a computer program productadapted to carry out the steps as set out in the description. Thecomputer executable program code adapted to carry out the steps set outin the description can be stored on a computer readable medium.

BRIEF DESCRIPTION OF DRAWINGS

FIG. 1 is a graphic representation of the training process of a deepneural network [10]. The diagram represents the untrained deep neuralnetwork [10] which is fed with a set of medical images [12] as input forwhich a segmentation target (or ground truth) represented as a contour[13] and represented as a region [14] is available. A comparison [15] ofthe outputs [16] and [17] of the deep neural network (representedrespectively by a contour and a region) is done with the respectiveground truths [13] and [14]. A loss function is calculated indicatingthe relevance of the produced outputs [16] and [17], based on which anadjustment of the parameters [20] of the nodes in the deep neuralnetwork is performed. A new iteration step will then evaluate theperformance of the adjusted deep learning network by means of therecalculation of the loss function.

FIG. 2 gives a schematic overview of the central position of the traineddeep neural network [100] in a preferred embodiment of the invention,wherein a medical image [110] is presented as input to the deep neuralnetwork, which produces two types of output: the confidence levelcontour map [120], and a confidence level region map [130]. Thepreferred embodiment relates to a segmentation method for identifying acollimation area in a radiography image.

FIG. 3 is a flowchart of a preferred embodiment of the invention that isused for segmenting a collimation area in a radiography image. [110]represents the original radiography image from which the collimationarea [111] needs to be segmented. The radiography image [110] ispresented to the deep neural network [100], which produces a confidencelevel contour map [120]. From the original radiography image [110], asafe initial contour [200] is estimated [201], which will be used as astarting point to compare and validate [305] the found improved proposalcontour [210] against. The confidence level contour map [120] issubsequently and iteratively decomposed [300] (using a e.g. a RANSACalgorithm) into discrete contour elements [301]. This discrete contourelement [301] is applied [304] to the safe initial contour [200]replacing one of the (former) contour elements, and as such changinginto an improved proposal contour [210]. In a next step, a validation[305] of the changed contour element is performed by comparing theoutputs of a cost function applied to both the safe initial contour[200] and the improved proposal contour [210]. The output of the costfunction decreases in case there is a better measure of agreement d withthe detected confidence level region map and/or the detected confidencelevel contour map. In case that the cost function of the improvedproposal contour [210] is lower than the compared original contour[200], the contour element is validated and then proposal contour ispropagated to the next iteration [305].

FIG. 4 is a flowchart depicting subsequent iterations of a preferredembodiment of the method of the invention. The flowchart represents themethod that starts after the successful validation of a first contourelement [301]. The data in the confidence level contour map [120] thatcontributed to the identification of the discrete contour element [301]is subsequently subtracted from the original confidence level contourmap [120], resulting in another (more limited) confidence level contourmap [121]. This limited confidence level contour map [121] is thensubsequently again further decomposed [300], resulting in a new discretecontour element [301′]. This discrete contour element [301′] is thenapplied [304] to the previously improved proposal contour [210],resulting in a further improved proposal contour [210′]. Again, avalidation [305] is performed, propagating a positive result to the nextiteration step for which again a (more limited) confidence level contourmap [122] is constructed. At the end of the iterative process, a finalcontour result [910] is available.

DESCRIPTION OF EMBODIMENTS

In the following detailed description, reference is made in sufficientdetail to the above referenced drawings, allowing those skilled in theart to practice the embodiments explained below.

As an initial step, in a preferred embodiment, one single deep neuralnetwork [10] is trained simultaneously on identifying two differentrepresentations [13, 14] of the same segmentation target [111], saidrepresentations being a definition of a region and of a contour of saidsegmentation target. In order to do so, a deep neural network defined bya number of nodes and a number of layers, is presented with a so-calledtraining set of data [11]. This training set comprises a preferably highnumber of medical images [12] in which the segmentation target isvisible, and for which the desired outputs [13, 14] are available. Thismeans that for each of the training images, a description of therespective segmentation solutions have to be available. The segmentationsolutions may be presented to the deep neural network in variousformats, but both solutions need to be available; the segmentationtarget marked as a contour [13] and marked as a region [14]. Thetraining set of medical images will, in practice, be prepared fortraining the deep neural network by means of a consistent set of digitalimages (characterized by a certain spatial resolution), and for instancea set of digital image masks representing the segmentation target as anarea and as a contour. The digital mask representations may be providedin the same or other spatial resolution than the medical image itself.The set of digital image masks may be discrete maps (comprising only 1or 0 as a presence indicator in the respective pixel location), or byconfidence level maps (providing a pixel-wise probability for thepresence of a region of interest).

In another preferred embodiment, the single deep neural network may bereplaced with two deep neural networks which will be trained separatelyon the different result types. One network will be trained to identifythe segmentation target marked as a contour, while the other will betrained to identify the segmentation target marked as a region. Thisembodiment has the advantage that the overall performance of the pair ofnetworks is higher in comparison with the performance of a singlenetwork, thanks to the specialisation of a network towards theperformance of a single task. While this approach is expected to produceeven better results (show better segmentation performance), this willcome at the cost of more computing power.

In a preferred embodiment, the deep neural network is trained on theidentification of the collimation area in a radiography image. Thecollimation area of a radiographic image is in fact the exposed portionof the image which is limited by the X-ray sources' collimators toreduce the exposed area of the patient to a minimum sufficient toperform the intended diagnose or reading. The collimation area typicallyhas a rectangular shape, and contains the diagnostic data of theradiographic image. The unexposed area outside of this collimation areain this radiography image typically has a white color with littlerelevant information, as it is (usually completely) underexposed. Sincecollimation blades do not always block all the radiation, this whitearea partially still comprises image information. The result is thatalongside the collimation area, there is a faint imprint of thesurroundings of the collimated area, allowing sometimes a betterorientation for the reader.

In general, there are multiple reasons why it is advantageous toidentify the collimation area in a radiography: 1) it allows to focusimage processing algorithms solely on the collimation area of this image(which most of the time improves the performance of such algorithms), 2)it makes it possible to selectively invert the color of the collimatedarea (i.e. the area outside the collimation) so that it is morecomfortable for the radiologist to read the image, as this operationreduces the contrast between the collimated area and the image itself.

In an alternative embodiment, the deep neural network is trained on theidentification of more complex area's of interest, such as for instancethe identification of bone structures in extremities or other bodyparts, the identification of the lungs in a chest, or for instance onthe identification of malignant structures (tumors, lung nodules, . . .). It speaks for itself that the deep neural network will have to betrained in this case with the appropriate image data set, and that it isof essence that the targeted region of interest can be representedeasily both as an area and as a contour.

After the training step of the deep neural network as explained above, anext step in the method of the invention is that a new medical image[110], for which the segmentation target has to be identified andlocated, is presented to the deep neural network in order to calculatethe two outputs [120, 130] and where one of the outputs is thesegmentation target that is represented as a detected confidence levelcontour map [120].

In a subsequent decomposition step [300], the detected confidence levelcontour map [120] will be decomposed into a discrete number of contourelements [301, 301′] that can be expressed in a (mathematically)analytical way, and which—when summed up—represent a completely closedcontour of the targeted region of interest. In the case of the presenceof multiple regions of interest in the medical image, the targetedregion of interest may be expressed as a set of closed contours. Inorder to be able to describe such a proposal contour analytically, itmay be decomposed into multiple contour elements, which are to beconsidered as a number of lines, curves or other shaped lines that maybe described in an analytical way, and that together, when summed up,describe the entire proposal contour. The result of the sum of the foundcontour elements is a closed piecewise continuous function. It isimportant that the recomposed result is a closed contour, as this is adomain requirement for any segmentation problem. The decomposition stepmay be any type of algorithm that is capable of extracting certaincontour features such as lines, arcs and corners. Such a contour elementmay, in the simplest form, be a line segment that can be expressedeasily in a mathematical and analytical way.

In a preferred embodiment, the decomposition algorithm is a RANSAC(Random Sample Consensus) estimation, that is an iterative method toestimate parameters of a mathematical model from a set of observed datathat contains outliers (data points that are far away from the otherpoints), and thus is less sensitive to noise. Alternative methods can beHough transform, or Line Segment Detector algorithms.

The extracted contour elements from the decomposition step above aresubsequently validated before they are accepted as a contributingcontour element of the final segmentation result. In the context of thisinvention, this validation will be made against information in theoutput of the deep learning network which is not being used in theprevious step for extracting the contour elements, and which isrepresented as an area (a detected confidence level region map). Thevalidations thus take place at the level of the contour element, not yetat the recomposed contour.

In one embodiment of the invention, the validation of a certain contourelement [301] is done by comparing a cost function [305] of a contourthat is derived in a first instance from a so-called safe initialcontour [200], with the same cost function when applied on a new contourproposal [210] in which the proposed contour element contributes. Thenew contour proposal [210] should have a lower cost function result incomparison with the previously proposed contour (which is the safeinitial contour at the start of the iterative process) before theproposed contour element can be accepted as a valid contribution to thefinal solution. As a safe initial contour, a suitable contour should bechosen that falls within the boundaries of the medical image. Said safeinitial contour should be chosen in a conservative fashion such that anyrisk to reduce this safe initial contour too much that it would excludea part of the final solution is avoided. The most “conservative” safeinitial contour that may be identified is the medical image boundaryitself; if choosing this boundary as a first safe initial contour, thenby definition there is no risk to exclude any data at all. Performanceof the algorithm may however be improved in case that the safe initialcontour already is chosen to better approach the final result.

The initial contour may be estimated based on algorithms that are knownin the art and that are capable of providing a relatively good initialestimate without risking to excluding any part of the segmentationtarget. Alternatively, it is also possible to estimate the initialcontour based information about the applied positions of the collimatorblades during the exposure by the X-ray modality.

The above mentioned cost function is based on a measure of agreement dof the tested contour with the detected confidence level region mapand/or the detected confidence level contour map. This may be achievedfor instance by calculating a weighted sum of how close the testedcontour is to the detected confidence level contour map, and theSorensen-Dice coefficient index of the inner part of the detectedconfidence level region map. The outcome of the cost function decreasesfor better candidates.

Additionally, other validation steps may be applied on the contourelements that depend on domain specific knowledge of the medical image.Validation steps (or acceptance criteria) relating to domain specificknowledge may accept or decline a certain proposed contour element as avalid solution in the case that certain criteria are met,or—respectively—not met. As an example that relates to the segmentationof a collimation area in a radiographic image, a possible validationcriterion could be the fact that a typical collimation field has aquadrangular shape in case that it is entirely visible in the field ofview, and that by consequence the contour elements are straight lines.Results that are not represented by straight lines may therefore berejected. Also, contour elements that cut through a part of the detectedconfidence level region map may similarly be rejected.

In case that any of the validation steps fail on a proposed contourelement during the decomposition step, and the contour element isconsequently rejected, this contour element is replaced with theoriginal corresponding contour element that was replaced by the newlyproposed contour element in the previously proposed contour (which isthe safe initial contour at the start of the iterative process). After avalidation of a contour element, the data of the confidence levelcontour map [120] contributing to the decomposition algorithm (e.g. theRANSAC estimation) of said contour element is removed from theconfidence level contour map [120, respectively 121], eventually onlypartially removed since for some parts might contribute to other contourelements, resulting in a next (more data-limited) confidence levelcontour map [121, respectively 122] comprising less data than theupstream confidence level contour map. This allows the next step of theiteration to proceed with identifying the next contour element, untilthere is no further data present in the last confidence level contourmap.

After a discrete number of iterations wherein contour elements aresuccessfully identified, and validated or rejected, no further data willbe available in the (more limited) confidence level contour map [122]which is the starting point of each next iteration step. At this point,all newly validated contour elements and all original correspondingcontour elements that were not replaced by the newly proposed contourelement due to their rejection, may be added up with each other to forma recomposed contour or the final contour result [910].

Even so, optional validation steps may be applied also on the level ofthe recomposed contour or the final contour result [910]. Suchvalidation steps will also depend on certain characteristics for thesegmentation result that is available as domain knowledge. For instance,bone segmentation should lead to a result wherein segmented area orareas clearly contain high electron density material, i.e. that thesegmented area(s) are clearly coloured white in the radiograph. Oralternatively, for instance, domain specific knowledge could excludecertain proposed contours that have deviating shapes from the expectedone or for instance seem to include multiple isolated areas, whereasthis is not allowed.

As an example, the decomposition step for targeting a collimation areain a medical image will substantially differ from a decomposition stepfor targeting for instance lung tissue in a medical image. The domainknowledge about segmenting a collimation area may for instance allowassumptions with regards to the shape of the collimation area (which ismostly rectangular, unless only partially visible in the field of viewof the image), and also allows to make the consideration that a falsenegative result (collimation are is estimated too large) is lesscritical than a false positive result (where the collimation area wouldbe estimated too small). Domain knowledge of the application will thusallow to implement intelligent decomposition decisions when determiningthe contour elements.

As an alternative embodiment, a similar approach may be conceived tostart a decomposition step starting from the confidence level region map[130]. Based on the confidence level region map a region mask can becreated (for example with a thresholding method). A further improvementof this mask can be created based on a so-called connected componentanalysis of the region mask and based on the neighbouring contourinformation each component has in the confidence level contour map.Components who are not connected to a minimal amount of contour mapcould be discarded, close components can be merged. Domain specificknowledge can be used to further improve the region mask. Such domainknowledge may be for instance a maximum number of components possible inone image or a definition of a minimum size component.

1.-11. (canceled)
 12. A method for improving the performance of a deepneural network on performing a segmentation task of identifying a regionof interest in an input image which is a medical image, comprising:performing two training tasks on said deep neural network for theidentification of said region of interest on two differentrepresentations of said region of interest, said representations being adefinition of a region and a contour of said region of interest,obtaining a detected confidence level region map, representing a pixelwise probability of the presence of a part of the segmentation target inthe medical image in the form of an image matrix, and a detectedconfidence level contour map, representing a pixelwise probability ofthe presence of a part of a contour in the same medical image in theform of an image matrix, for an input image from said trained deeplearning network, from said detected confidence level contour map,iteratively determining a set of discrete contour elements to describesaid detected confidence level contour map as a closed contour, byoptimizing the sum of said continuous functions describing said discretecontour elements as a best fit to said detected confidence level contourmap, performing a validation of each of said sum of said discretecontour elements by evaluating a measure d of agreement of an improvedproposal contour with said detected confidence level region map of saidregion of interest, said improved proposal contour comprising saidcontour element, returning a final contour result comprising saidvalidated contour elements as a result for the identified region ofinterest.
 13. The method according to claim 12, wherein said twotraining steps comprise: performing a training step of said deep neuralnetwork on identifying said region of interest, comprising: presenting atraining data set of medical images containing said region of interestto said deep neural network as an input, said training data setcomprising for each image an associated ground truth binary region maprepresenting the location of said region of interest in said image, andperforming a training step of said deep neural network on identifyingsaid contour of interest, comprising: presenting a training data set ofmedical images containing said region of interest to said deep neuralnetwork as an input, said training data set comprising for each image anassociated ground truth binary contour map representing the location ofa contour of said region of interest in said image.
 14. The methodaccording to claim 12, wherein the medical images are CR, DR or otherradiography images.
 15. The method according to claim 12, wherein themedical images are radiography images, and wherein said region ofinterest is the skeleton, the lungs, or bone structures.
 16. The methodaccording to claim 12, wherein the best fit is based on a RANSACestimation or Hough transform.
 17. The method according to claim 12,wherein said contour elements are lines, curves, or other continuousfunctions.
 18. The method according to claim 12, wherein said evaluationof said contour elements is performed by calculating a measure d′ ofagreement of said improved proposal contour, said improved proposalcontour comprising said contour element, with the detected confidencelevel region map, and comparing it with a measure d of agreementcalculated for a previous proposal contour, said previous proposalcontour not comprising said contour element, with the detectedconfidence level region map, and accepting said contour element as acontour element of an improved proposal contour when d′>d.
 19. Themethod according to claim 12, wherein each of said contour elements isadditionally validated against at least one rule that is defined by anycriterion that may allow a contour element to be accepted/declined basedon domain knowledge.
 20. The method according to claim 12, wherein saidfinal contour result is validated against at least one rule that isdefined by any criterion that may allow a contour element to beaccepted/declined based on domain knowledge.
 21. A data processingsystem comprising means for carrying out the steps of the method ofclaim
 12. 22. A computer program comprising instructions which, when theprogram is executed by a computer, cause the computer to carry out thesteps of the method of claim
 12. 23. The method according to claim 13,wherein the medical images are CR, DR or other radiography images, 24.The method according to claim 13, wherein the medical images areradiography images, and wherein said region of interest is the skeleton,the lungs, or bone structures.
 25. The method according to claim 13,wherein the best fit is based on a RANSAC estimation or Hough transform.26. The method according to claim 13, wherein said contour elements arelines, curves, or other continuous functions.
 27. The method accordingto claim 13, wherein said evaluation of said contour elements isperformed by calculating a measure d′ of agreement of said improvedproposal contour, said improved proposal contour comprising said contourelement, with the detected confidence level region map, and comparing itwith a measure d of agreement calculated for a previous proposalcontour, said previous proposal contour not comprising said contourelement, with the detected confidence level region map, and acceptingsaid contour element as a contour element of an improved proposalcontour when d′>d.
 28. The method according to claim 13, wherein each ofsaid contour elements is additionally validated against at least onerule that is defined by any criterion that may allow a contour elementto be accepted/declined based on domain knowledge.
 29. The methodaccording to claim 13, wherein said final contour result is validatedagainst at least one rule that is defined by any criterion that mayallow a contour element to be accepted/declined based on domainknowledge.
 30. A system for performing a segmentation task ofidentifying a region of interest in an input image which is a medicalimage, the system comprising: a processor; and a memory storingprocessor-executable instructions that, when executed by the processor,operate a deep neural network configured for: performing two trainingtasks on said deep neural network for the identification of said regionof interest on two different representations of said region of interest,said representations being a definition of a region and a contour ofsaid region of interest; obtaining a detected confidence level regionmap, representing a pixel wise probability of the presence of a part ofthe segmentation target in the medical image in the form of an imagematrix, and a detected confidence level contour map, representing apixelwise probability of the presence of a part of a contour in the samemedical image in the form of an image matrix, for an input image fromsaid trained deep learning network; from said detected confidence levelcontour map, iteratively determining a set of discrete contour elementsto describe said detected confidence level contour map as a closedcontour, by optimizing the sum of said continuous functions describingsaid discrete contour elements as a best fit to said detected confidencelevel contour map; performing a validation of each of said sum of saiddiscrete contour elements by evaluating a measure d of agreement of animproved proposal contour with said detected confidence level region mapof said region of interest, said improved proposal contour comprisingsaid contour element; and returning a final contour result comprisingsaid validated contour elements as a result for the identified region ofinterest.
 31. One or more computer-readable media for performing asegmentation task of identifying a region of interest in an input imagewhich is a medical image, the computer-readable media storingprocessor-executable instructions that, when executed by a processor,operate a deep neural network configured for: performing two trainingtasks on said deep neural network for the identification of said regionof interest on two different representations of said region of interest,said representations being a definition of a region and a contour ofsaid region of interest; obtaining a detected confidence level regionmap, representing a pixel wise probability of the presence of a part ofthe segmentation target in the medical image in the form of an imagematrix, and a detected confidence level contour map, representing apixelwise probability of the presence of a part of a contour in the samemedical image in the form of an image matrix, for an input image fromsaid trained deep learning network; from said detected confidence levelcontour map, iteratively determining a set of discrete contour elementsto describe said detected confidence level contour map as a closedcontour, by optimizing the sum of said continuous functions describingsaid discrete contour elements as a best fit to said detected confidencelevel contour map; performing a validation of each of said sum of saiddiscrete contour elements by evaluating a measure d of agreement of animproved proposal contour with said detected confidence level region mapof said region of interest, said improved proposal contour comprisingsaid contour element; and returning a final contour result comprisingsaid validated contour elements as a result for the identified region ofinterest.